import java.util.HashMap;


public class TimeTestForHashMap1000000 {
	public static void main(String[] args) {
		int[] array = new int[1000000];
		for (int i = 0;i < 1000000; i++)
			array[i] = i;
		long time1;
		long time2;
		HashMap<Integer,Integer> map = new HashMap<Integer, Integer>();
		time1 = System.nanoTime();
		for (int i = 0; i < 1000000; i++)
			map.put(array[i], array[i]);
		time2 = System.nanoTime();
		long time3;
		long time4;
		time3 = System.nanoTime();
		for (int i = 0; i < 1000000; i++);
		time4 = System.nanoTime();
		System.out.println(((time2-time1)-(time4-time3))/1000000);
	}
}
